import time,json

#from nebula3.Config import SessionPoolConfig
#from nebula3.gclient.net.SessionPool import SessionPool
from flask import Flask, request, jsonify
from flask_cors import CORS
from urllib.parse import unquote
from gmssl import sm3

NEBULA_IP = '127.0.0.1'
NEBULA_PORT = 9669
NEBULA_USER = 'root'
NEBULA_PSW = 'root'
NEBULA_SPACE = 'portrait'

API_PORT = 9877

app = Flask(__name__)
CORS(app)

@app.route('/system/show/map', methods=['POST'])
def get_data():
    data = [
      {
        'mapName': '北京',
        'mapValue': 123123
      },
      {
        'mapName': '上海',
        'mapValue': 12312
      }
    ]
    return jsonify({
      'data': data
    })
  
@app.route('/getInfo', methods=['GET'])
def get_data1():
    data = [
      {
        'mapName': '北京',
        'mapValue': 123123
      }
    ]
    return jsonify(data)
  
@app.route('/captchaImage', methods=['GET'])
def get_data2():
    data = [
      {
        'mapName': '北京',
        'mapValue': 123123
      }
    ]
    return jsonify({
      'data': {
        'uuid': 'uuid',
        'img': '123'
      }
    })


if __name__ == '__main__':
    app.run(debug=False, host='0.0.0.0', port=API_PORT)
